home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 126-150 / scopedisk127 / xoper / xoper.doc < prev    next >
Text File  |  1995-03-19  |  21KB  |  564 lines

  1.                  Xoper V2.2
  2.  
  3.             Copyright (c) Werner Gunther 1989
  4.  
  5. Xoper is a freeware program to display and to control system activity.
  6. Permition is granted to freely distribute this program.
  7.  
  8. --------------------------------------------------------------------------
  9. Changes in V1.2:
  10. New commands: Snoop, Capture, ClrCool, ClrWarm, ClrCold.
  11. Added        : CPU usage by task.
  12.  
  13. Cancel command has been rewritten, some minor bugs removed.
  14. ---------------------------------------------------------------------------
  15. Changes in V1.3:
  16. New commands: [S]=Stack usage, Sort, Hide, Hidden, Header, Window,
  17.           InputHandler.
  18. Added        : Support of startup-scripts, I/O Interrupts/second, 'Kill' an
  19.           alias for 'Cancel'.
  20. Some BIG bugs have been removed: The port-display used to GURU if more than
  21. 32 Ports did exist. The Cli Xoper has been started did act like having a
  22. priority of 128. Unlock didn't unlock sometimes, the interrupt/priority
  23. field did contain rubbish, Currentdir didn't examine all Processes.
  24. There were some more, minor bugs, all (hopefully) removed.
  25. ---------------------------------------------------------------------------
  26. Changes in V1.3b:
  27. New commands: [C] information on CLI-Tasks.
  28. Added        : 'Time 0' stops any update, System-Requesters are now handeled
  29.           correctly (affects 'Kill' and 'Closewindow').
  30. ---------------------------------------------------------------------------
  31. Changes in V2.0:
  32. The 'user interface' (what user interface ?) has been rewritten from
  33. scratch, and a small iconify routine has been added. To customize the whole
  34. thing a little bit, there are a few new commands:
  35.  MinimumChars, HistoryLines, ShowHistory, KillHistory, OutputLines,
  36. IconifyOff, BackDropIcon, UseScreen, UseWindow.
  37. Other new commands include:
  38. TimerIO, RemResident, Repeat, TrapGuru, Setfont, DiskChange, Alias,
  39. SaveOutput.
  40. Addresses are now shown as 32-Bit values for 68020 compatibility. The 'More'
  41. command is obsolete and has been removed. The 'interrupt list' has two new
  42. fields. 'Time' w/o parameters shows current setting. 'display commands'
  43. separated by blanks will display the lists one by one, instead of
  44. displaying them all at once.
  45. ---------------------------------------------------------------------------
  46. Changes in V2.1:
  47. Mostly bug fixes:
  48.  KS1.3 dependancy removed. Using UseScreen in the startup file could crash
  49. the program if started with the -b flag. The S (stack) command wasn't
  50. robust enought. Some strangness in the 'KILL' routine have been removed.
  51. The iconizing routine couldn't distinguish between multiple drags and
  52. doubleclicks.
  53. Added: SetFKeys, Time accepts values < 1, 'Windows' shows the owner task (if
  54. available). The task display shows the name of the loaded command
  55. (enclosed in '[]') instead of the name, if the task is a CLI, 'CLICmd'
  56. toggles this feature on/off. Commandline completion using <tab>.
  57.  
  58. A new program 'KillXoper' has been added to the distribution to remove
  59. Xoper from memory in case it loops or freezes (I hope it won't be needed).
  60. ---------------------------------------------------------------------------
  61. Changes in V2.2:
  62. The 'KillXoper' routine has been put into Xoper's main program. Loaded CLI
  63. commands are always displayed, not only in the task list.
  64. ---------------------------------------------------------------------------
  65.  
  66. Starting Xoper from CLI:
  67.  
  68. Xoper [kill] [-b] [T] [F] [S] [L] [D] [R] [E] [M] [P] [I] [C]
  69.  
  70. These parameters are described below. For all those who like long
  71. Startup-Sequences, overcrowded memory and hot-keys enter
  72.  
  73. Xoper -b
  74.  
  75. This will install Xoper in background waiting for LeftAmiga-RightAmiga-X
  76. to pop up. In both cases you don't have to RUN or RUNBACK Xoper, it will
  77. always create its own process.
  78.  
  79. Xoper kill
  80.  
  81. will kill an already running Xoper task from outside, in case Xoper hangs or
  82. guru's.
  83.  
  84. At startup Xoper loads and executes a file named S:Xoper.Startup if such a
  85. file is available. This startup-script is used to set default values, the
  86. window size or the initial default list to be displayed. The Xoper-window
  87. will only be opened after the startup-script has been processed. Look at the
  88. end of the document for a sample startup file.
  89.  
  90. Xoper Window:
  91. -------------
  92.  The window (or screen if you request one) is devided into two sections: a
  93. very small input line on the bottom and a large output area on the top. If
  94. the output exceeds the size of the window you may scroll or 'page' through
  95. the text using the num-pad keys:
  96.  
  97. A1000  A2000/A500
  98.   7    Home        Top of display
  99.   1    End        Bottom
  100.   9    Pg Up        one page up
  101.   3    Pg Dn        one page down
  102.   8    Up Arrow    one line up
  103.   2    Down Arrow    one line down
  104.   4    Left Arrow    one page left
  105.   6    Right Arrow    one page right
  106.  
  107.  The input section has some line editing facilities and a history buffer
  108. contollable with the following keys (similar to NewCon and ConMan):
  109.  
  110. Cursor left        cursor one character left
  111. Shift  left        cursor to the start of the next word
  112. Cursor right        one character right
  113. Shift  right        previous word
  114. Cursor Up        previous line in history buffer
  115. Shift  Up        top of buffer
  116. Cursor Down        next line in history buffer
  117. Shift  Down        bottom of buffer
  118. DEL            DEL
  119. BS            backspace
  120. Ctrl   X        delete line
  121. Ctrl   Y        delete EOL
  122. Ins   (numpad '0')      toggles insert mode (default is 'on')
  123. Del   (numpad '.')      same as DEL
  124.  
  125. ESC            moves the input area from the bottom into the
  126.             output section. Entering a command here (i.e
  127.             overwiting an output line), will cause Xoper to add
  128.             the address of that node to your command line.
  129.             Example: Show the hunks of a 'File.System' process:
  130.             type 'T' to get a list of all tasks, press <esc>,
  131.             move the cursor to the line displaying the
  132.             File.System process and type 'Hunks <enter>'. Press
  133.             <enter> once more to return to the usual Xoper
  134.             display.
  135. Help            displays a help panel.
  136. TAB            Command line completion.
  137.             Example: press <c>, hit <tab> several times.
  138.  
  139. The Xoper window has, beside the usual closewindow and depth-arrange
  140. gadgets, a custom gadget on its title bar, used to iconify Xoper. The icon
  141. may be moved anywhere on the screen just by dragging it, double clicking
  142. the icon will restart the program. The window itself is a simple_refresh
  143. window, so it may look a little bit sluggish when it needs a refresh.
  144.  
  145. Xoper Commands:
  146. ---------------
  147.  
  148.  Commands are entered in the command line at the bottom of the window,
  149. these are divided into two groups:
  150.  
  151. Display commands: These are always single character entries and may be
  152. specified in any order, upper or lower case, after the prompt or from CLI
  153. as parameters. If more than one list has to be displayed, you may enter
  154. several commands in one line. Separating them with blanks display the lists
  155. one by one instead of showing them all at once.
  156.  
  157. T = Tasks (Default if Xoper is called without parameters)
  158. Task node (HEX), Display type, status, priority (decimal), CPU usage
  159. (percent), processnumber for Dos-Processes (decimal), taskname (or the
  160. name of the loaded command, if a CLI process. The loaded command name
  161. is enclosed in '[]').
  162.  
  163. F = Task Flags
  164. Task node (HEX), Allocated Signals (HEX), Signals the Task is waiting for
  165. (HEX), Signals received (HEX), Address of the next instruction to be
  166. executed (HEX).
  167.  
  168. C = Cli Commands
  169. Task node (HEX), Type (interactive/batch), Mode (Background/Foreground),
  170. CLI number, CLI name, program it executes.
  171.  
  172. L = Libraries
  173. Base address (HEX), open count (decimal), version (decimal), revision
  174. (decimal), flags (binary), libraryname.
  175.  
  176. D = Devices
  177. Base address (HEX), open count (decimal), version (decimal), revision
  178. (decimal), flags (binary), devicename.
  179.  
  180. E = Resident (sorry)
  181. Base address (HEX), priority (decimal), flags (binary), version
  182. (decimal), type, name.
  183.  
  184. R = Resources
  185. Base address (HEX), open count (decimal), version (decimal), revision
  186. (decimal), flags (binary), resource name.
  187.  
  188. M = Memory
  189. Lower and upper bounds (HEX), bytes free (decimal), attributes, priority
  190. (decimal), hunk name.
  191.  
  192. P = Ports
  193. Node address (HEX), portname, flags, signal bit (decimal), queue length
  194. [number of messages] (decimal), taskname.
  195.  
  196. I = Interrupts
  197. Node address (HEX), pointer to interrupt data (HEX), pointer to interrupt
  198. code (HEX), priority (decimal),[T]ype ([S]erver/[H]andler), [S]tate
  199. ([E]nabled/[D]isabled), type (interrupt queue the interrupt belongs to),
  200. interrupt name.
  201.  
  202. S = Stack
  203. Lower limit of the stack, stack size, currently used stacksize, taskname.
  204. If you want to minimize your stack using this utility, please note that
  205. DOS-functions use 1500 Bytes at the bottom of the Stack frame for their own
  206. purposes and note that the stacksize is only checked one time per second by
  207. this command.
  208.  
  209. H = Help ( or ?)
  210. Show a list of commands.
  211.  
  212. ; = NOP
  213. Skip this line (used for remarks in a script file)
  214.  
  215. Q = Quit
  216. Same as QUIT (see below).
  217.  
  218. Example: Entering TPM would display Tasks, Ports and Memory. The display
  219. would be updated after a few seconds (5 by default, may be changed
  220. anytime, see below.)
  221.  
  222. Other commands that do not display EXEC lists:
  223. These commands may be entered upper or lower case. Parameters enclosed
  224. in '<>' must be, enclosed in '[]' may be specified. Names are usually
  225. entered as ascii strings, it can however happen that two or more nodes of
  226. the same name exist. On tasks you may specify the DOS-Processnumber to
  227. sort them out. If everything fails, you can enter the Node-Address with a
  228. leading '$'. This address will be checked first before the command is being
  229. executed. If the check fails, you'll get an error message or a warning or
  230. a prompt, depending on what went wrong. Names are always the last parameter
  231. to enter. This may seem strange, but it is the simplest way to get rid of
  232. embedded blanks.
  233.  
  234. Time <seconds>
  235. Set time between updates. Minimum is 0.1 seconds, maximum is 255.9, default
  236. is 5 seconds. Time 0 stops automatic update and waits for a keypress. Values
  237.  < 0.5 are not recommended.
  238. Example: Time 1.5
  239.  
  240. Taskpri <priority> [processnumber] <taskname>
  241. Change the priority of a task. Values may range from -127 to 127, better
  242. use values between -5 and 5.
  243. Example: Taskpri 1 New Cli
  244.  
  245. Mypri <priority>
  246. Shortcut for "Taskpri Xoper <priority>"
  247. Example: Mypri 2
  248.  
  249. Pri <priority> <nodename>
  250. Change the priority of any other node. This command does not work for Tasks.
  251. If the specified node has been found, the entire list the node belongs to
  252. will be resorted.
  253. Example: Pri 1 Chip Memory      (try to allocate memory in CHIP first)
  254.  
  255. Break [processnumber] <taskname>
  256. Set break signals. Useful for tasks running in background or from Workbench.
  257. Example: Break 3 New CLI
  258.  
  259. Hunks [processnumber] <processname>
  260. Show location, BCPL-Pointers and length of memory blocks the process uses.
  261. Example: Hunks RAM
  262.  
  263. Snoop [processnumber] <taskname>
  264. Track memory allocation/deallocation of a task. Press break (CTRL-C) to
  265. stop. List includes: action (alloc/free), memory requirements (CHIP/ FAST/
  266. PUBLIC etc), memory size, memory location (start, end) and the address from
  267. where AllocMem() was called.
  268.  
  269. Files
  270. List lock, access, size and name of open files.
  271.  
  272. Locks
  273. List any lock.
  274. BUG: Trying to lock the Volume "RAM Disk" crashes the machine sometimes. If
  275. a Volume "RAM Disk" is found it will be replaced by the devicename "RAM:"
  276. (this has been fixed on WB 1.3). Make sure you don't have a disk labeled
  277. "RAM Disk" or you'll never see its locks:-)
  278.  
  279. Currentdir
  280. List current directory settings of all processes.
  281.  
  282. Devices
  283. List name,heads,sectors,tracks,startup-buffers and handler-process of every
  284. DOS-device.
  285.  
  286. Inputhandler
  287. Display node, priority and name (if any) of the input-handlers currently in
  288. use.
  289.  
  290. Capture
  291. Show vectors controlling the reset, i.e. CoolCapture, ColdCapture and
  292. WarmCapture pointers, KickMem allocations. Useful when searching
  293. for Viruses, but remember that the RAD: device in 1.3 uses the KickMem
  294. pointer to recover from a reset.
  295.  
  296. ClrCool
  297. ClrCold
  298. ClrWarm
  299. Clear one of those pointers.
  300.  
  301. TimerIO
  302. Display pending timer requests. It shows the address of the
  303. IORequest-structure, the unit (MICROHZ or VBLANK), the time to complete (up
  304. to 255 secs) and the task submitting the request.
  305.  
  306. RemResident <resident module name>
  307. Kicks the resident module out of the ResModules-List. It does not free the
  308. module itself, but only makes sure it won't be reactivated during the next
  309. reset. Removing a ROM-based module does not have any effect.
  310.  
  311. Repeat <Command string>
  312. Repeats the command string at the current refresh rate (see 'Time').
  313. However, commands not producing any output won't be repeated, but only
  314. executed once. Press <enter> to stop.
  315. Example: Time 1
  316.      Repeat TimerIO
  317.  
  318. TrapGuru
  319. Activates a trap handler similar to GOMF. It only works with a 68000
  320. processor, as it relys on a specified stack frame (at least I think so,
  321. couldn't check it out). If an exception occurs (i.e. GURU) Xoper will
  322. stop (or popup, if running in background) and display some information
  323. about what happened (the taskname causing the error, its program counter,
  324. the alert number etc.) and you'll be asked if you want to (K)ill the task
  325. or (I)gnore the exception. Choosing (i)gnore will do nothing at all if the
  326. erroneous program was a process (as it will stop itself displaying a
  327. 'Task held...' requester), but force a task to execute a 'Wait(0L)' (i.e.
  328. wait forever) as tasks do directly display an alert box.
  329.  
  330. Alias <AliasName> <CommandName>
  331. Defines a new name to be used along with the original command name. The new
  332. name should not contain any blanks.
  333. Example: Alias ih InputHandler
  334.  
  335. SetFKey <key number> <string>
  336. Assign a string to a funktion key. 'Key number' is a value between 1-20,
  337. 10-20 denotes shifted keys. Use '^' to simulate a <return> and '_' for
  338. space (the parser strips leading/trailing blanks).
  339. Example: SetFKey 1 Hunks^
  340.      enter t <return>, press <escape>, move the cursor to a process,
  341.      press F1
  342.  
  343. Lockdrive <drivename:>
  344. Prevent DOS, Workbench and Disk-Validator from cluttering on the drive.
  345. This command isn't very useful, but I needed it myself. Please note that
  346. the drivename is case sensitive and has to end with a ':'.
  347.  
  348. Freedrive <drivename:>
  349. Re-enable a drive.
  350.  
  351. DiskChange
  352. Show all installed diskchange interrupts. It displays the node, data and
  353. code fields of the interrupt, the device it is attached to (df0:-df3:) and
  354. the task which added the interrupt (if available). The main purpose for
  355. this command is to check for a virus, as the diskchange interrupt is a
  356. wonderful place to install them.
  357.  
  358. Windows
  359. List address and title of all windows.
  360.  
  361. Screens
  362. List address and title of screens.
  363.  
  364. Fonts
  365. List address,height,width,type,fist character and last character of all
  366. loaded fonts.
  367.  
  368. Windowfonts
  369. List Windows and associated fonts.
  370.  
  371. SetFont [size] <fontname> <window>
  372. Change the default font of a window. To avoid confusion, you should use a
  373. font with the same font size as the original font, as many programs rely on
  374. the point size.
  375. Example: Windows
  376.      Press <esc>, move the cursor to the Xoper window line and type
  377.      Setfont diamond.font
  378.      (now you know what I mean by 'relying on a font size' :-))
  379.  
  380. Freeze [processnumber] <taskname>
  381. Halt a Task. The task should be READY or WAITING. Frozen tasks are queued in
  382. a new list called FROZEN. When you leave Xoper, halted Task will be
  383. released.
  384. Example: Freeze Killer Graphics Task
  385.  
  386. Warm [processnum] <taskname>
  387. Restart a halted Task. Task must be FROZEN.
  388. Example: Warm Killer Graphics Task
  389.  
  390. Hide <taskname>
  391. The task-list tend to be longer than the window size. You may inhibit the
  392. output of some tasks you are not interested in using his command.
  393. Example: Hide trackdisk.device
  394.  
  395. Hidden
  396. Turn those hidden Tasks back on. It is actually a toggle.
  397.  
  398. Header
  399. Toggle the (rather long) header on the task display on/off.
  400.  
  401. Sort
  402. The tasks listing is sorted (on V1.3 and above) to avoid 'jumping' of the
  403. display. Sort toggles this feature on/off. (Stupid command, but was easy
  404. to implement).
  405.  
  406. CLICmd
  407. Toggles between showing the loaded command and the taskname of CLI processes
  408. in the tasks listing.
  409.  
  410. Info <librarynode | devicenode>
  411. Show additional information stored in the lib_IdString field.
  412. Example: Info arp.library
  413.  
  414. Openlib <libraryname>
  415. Open a library. This is useful if you don't want a specified library being
  416. 'flushed' out.
  417. Example: Openlib arp.library
  418.  
  419. Clear [longword]
  420. Fill unused memory chunks with pattern, default is 0. Handy for debuggers.
  421. Example: Clear $66726565
  422.  
  423. Flush
  424. Clean up memory, flush unused libraries, devices and fonts.
  425.  
  426. Lastalert
  427. Show last Guru Meditation code or rubbish.
  428.  
  429. Usage
  430. Toggle CPUSE field on the task display between usage relative to all
  431. possible dispatches and usage relative to actually dispatched tasks.
  432. Ahem...not very clear I think. Well, let me try again...
  433. If you add all CPUSE fields together you get 100 % (more or less 1%). After
  434. entering "Usage" adding the fields together will give you the same value as
  435. shown in the 'CPU Activity field'. (I HATE having to write docs)
  436.  
  437. Taskports
  438. Disable / enable a listing of taskports if ports are displayed.
  439.  
  440. Window <leftedge> [toptedge [width [height]]]
  441. Works only on script files. Defines the window to be opened.
  442. Example: Window 0 0 550 190
  443.  
  444. HistoryLines <number of lines>
  445. Set the maximum number of input lines the history buffer should hold.
  446. Default is 10 lines.
  447.  
  448. MinimumChars <number of characters>
  449. Set the minimum number of characters an inputline should have to be added to
  450. the history buffer.
  451. Default is 2 characters.
  452.  
  453. ShowHistory
  454. Show the history buffer. (quite useless, I know)
  455.  
  456. KillHistory
  457. Delete all lines from the history buffer. (still useless)
  458.  
  459. OutputLines <number of lines>
  460. Set the maximum number of lines the output buffer may hold. If the buffer
  461. overflows, a line from the top of the buffer will be deleted for each new
  462. line.
  463. The default value is 500, using a maximum of 500 * 104 = 52000 bytes.
  464.  
  465. SaveOutput <filename>
  466. Write the contents of the output buffer to a file.
  467.  
  468. IconifyOff
  469. Turns the iconifying routine off, freeing all memory associated with its
  470. code and image.
  471.  
  472. BackDropIcon
  473. Puts the Xoper icon behind all other windows, instead of creating it on top
  474. of them.
  475.  
  476. UseScreen
  477. Opens Xoper on a screen. The new screen will take its data (width, colors,
  478. viewmodes etc.) from the Workbench screen and open a borderless backdrop
  479. window on it.
  480.  
  481. UseWindow
  482. Opens Xoper on a window.
  483.  
  484. Quit or just Q
  485. Exit Xoper. If Xoper was started with '-b' or if 'Hold' was specified it
  486. will stay in background waiting for LeftAmiga-RightAmiga-X.
  487.  
  488. Hold
  489. Exit Xoper but install a key-handler and stay in background. Window
  490. settings and display commands are saved.
  491.  
  492. Exit
  493. Clean up and quit.
  494.  
  495. !!!! WARNING: The next few commands are dangerous and 'dirty' !!!!!
  496. !!!!!!!!!!!! don't use them if not strictly necessary !!!!!!!!!!!!!
  497.  
  498. Kill [processnumber] <taskname>
  499. Kill a task or a process. If the task has been called from CLI, the Task
  500. itself and the CLI will be killed. Hunks, Windows, Screens  and the
  501. teminal-window will be freed. Simple tasks are just RemTask()'ed. If it is
  502. not a CLI Task you'll be asked if it is a Workbench task, if the answer is
  503. 'Yes' unloading will be done by the Workbench. If not, you will be prompted
  504. if Xoper should unload the code. Enter 'No' if you don't know how the task
  505. has been started. A good example for tasks that should NEVER be unloaded are
  506. program started by ARP'S ASyncRun (or ARun).
  507.  
  508. Closewindow <title>
  509. Closes a Window. Please, use it only if the corresponding Task has been
  510. 'Cancel'ed. Use the Window-Structure address if the window has no name.
  511.  
  512. Closescreen <title>
  513. same as above, but for screens.
  514.  
  515. Unlock <lock (BPTR)>
  516. Unlock a file.
  517.  
  518. Closelib <libraryname>
  519. This is exactly the same as CloseLibrary().
  520.  
  521. CD [processnumber] <processname>
  522. Change the current directory of a process. You are prompted if the old
  523. directory lock should be unlocked.
  524.  
  525. Signal <mask> [processnumber] <taskname>
  526. Set any task-signal. Mask is a hexadecimal value with or w/o leading '$'.
  527. See task's SIGWAIT field for sensible values. Tasks normally do not wait for
  528. signals only, but for messages, that's why this command may not have the
  529. desired effect, but it is quite useful for tasks hanging around and waiting
  530. for events that may never happen. Warning: Using Signal without any
  531. knowledge about what you are going to signal may cause a system-crash!
  532. Example: Signal 10000000 PopCLI III
  533.  
  534. ----------------------------------------------------------------------------
  535. ;Sample Startup Script (to be placed in s:Xoper.Startup)
  536. ;
  537. ; Window definition on a overscanned + PAL Workbench screen
  538. Window 122 0 550 230
  539. ;
  540. ;don't display some Tasks
  541. ;
  542. Hide CON
  543. Hide trackdisk.device
  544. ;
  545. ;but turn them on on Startup
  546. ;
  547. Hidden
  548. ;
  549. ;Change the default list to Ports
  550. ;
  551. P
  552. ----------------------------------------------------------------------------
  553. Please send flames, bug reports and especially a list of features you would
  554. like to have included in the next version to
  555.  
  556.  Werner Gunther
  557.  Wingertspfad 12
  558.  D 6900 Heidelberg
  559.  (Germany)
  560.  
  561. or to my EMAIL address for a fast response:
  562.  
  563.  G35@DHDURZ1.BITNET
  564.